package com.lituoxy.utils;

import android.content.Context;

/**
 * 作者：shuizi_wade on 2017/3/2 15:12
 * 邮箱：674618016@qq.com
 */
public class PrefName {
    public final static String MY_PREF = "dialer";
    public final static String TOKEN_TYPE = "token_type";
    public final static String ACCESS_TOKEN = "access_token";
    public final static String LOGIN_NAME = "login_name";
    public final static String NICK_NAME = "nickname";
    public final static String REAL_NAME = "realname";
    public final static String AVATAR = "avatar";
    public final static String USER_ID = "id";
    public final static String NAME = "name";
    public final static String SYS_NAME = "sys_name";
    public final static String ROLE_TYPE = "role_type";
    public final static String SCREEN_HEIGHT = "screen_height";
    public final static String SCREEN_WIDTH = "screen_width";
    public final static String MOBIE = "mobie";
    public final static String LOGIN = "login";
    public final static String MERCHANT_ID = "merchant_id";
    public final static String HUAWEI_PHONR = "huaweiPhone";
    public final static String HUAWEI_PASSWORD = "huawei_password";
    public final static String HUAWEI_LIST = "huawei_list";

    public static String getTokenType(Context context) {
        return PreferencesUtils.getString(context, TOKEN_TYPE);
    }

    public static String getMobie(Context context) {
        return PreferencesUtils.getString(context, MOBIE);
    }

    public static String getAccessToken(Context context) {
        return PreferencesUtils.getString(context, ACCESS_TOKEN);
    }

    public static String getLogin(Context context) {
        return PreferencesUtils.getString(context, LOGIN);
    }

    public static String getNickName(Context context) {
        return PreferencesUtils.getString(context, NICK_NAME);
    }

    public static String getRealName(Context context) {
        return PreferencesUtils.getString(context, REAL_NAME);
    }

    public static String getAVATAR(Context context) {
        return PreferencesUtils.getString(context, AVATAR);
    }

    public static int getMerchantId(Context context) {
        return PreferencesUtils.getInt(context, MERCHANT_ID);
    }

    public static int getUserId(Context context) {
        return PreferencesUtils.getInt(context, USER_ID);
    }

    public static String getNAME(Context context) {
        return PreferencesUtils.getString(context, NAME);
    }

    public static String getSysName(Context context) {
        return PreferencesUtils.getString(context, SYS_NAME);
    }

    public static String getRoleType(Context context) {
        return PreferencesUtils.getString(context, ROLE_TYPE);
    }

    public static String getLoginName(Context context) {
        return PreferencesUtils.getString(context, LOGIN_NAME);
    }

    public static void remove(String key, Context context) {
        PreferencesUtils.getPref(context).edit().remove(key).commit();
    }
}
